<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:ft="https://github.com/OpenType/fonttest"
      xmlns:xlink="http://www.w3.org/1999/xlink">
<body>
<h3 id="MORX-35">MORX-35: Insertion with DontAdvance</h3>

<div class="desc">
  The <a href="../fonts/TestMORXThirtyfive.ttf">font</a> for this test case has
  an <a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html"
  >AAT Extended Glyph Metamorphosis Table</a>
  with a single <em>Glyph Insertion Subtable</em>. Its finite-state machine
  contains two states (0 and 1) with the following transitions:
</div>

<ul class="desc">
  <li>For glyph <em>A</em></li>
  <ul class="desc">
    <li>in state 0, the machine moves to state 1 while inserting
    <em>C</em> after the current position.
    This transition carries the <em>DontAdvance</em> flag.</li>

    <li>in state 1, the machine moves to state 0 while inserting
    <em>B</em> after the current position.
    This transition carries no flags.</li>
  </ul>

  <li>For glyphs <em>B</em> and <em>C,</em> the machine stays
  in its current state while inserting <em>E</em> to the right of
  the current position.  This transition carries no flags.</li>

  <li>For any other glyphs and “end of text”, the machine performs
  no action.</li>
</ul>

<div class="desc">
  See also <a href="https://github.com/harfbuzz/harfbuzz/issues/1224">HarfBuzz
  bug 1224</a>.
</div>

<table>
  <tr>
    <th></th>
    <th style="text-align:center">A</th>
    <th style="text-align:center">XAY</th>
  </tr>
  <tr>
    <th>Expected</th>
    <td class="expected" ft:id="MORX-35/1" ft:render="A"
        ft:font="TestMORXThirtyfive.ttf"><svg version="1.1" viewBox="0 -200 2417 1200"><symbol id="MORX-35/1.A" overflow="visible"><path d="M459,221 L176,221 L91,0 L0,0 L279,717 L360,717 L638,0 L545,0 Z M352,517 Q345,537 335,568 Q325,599 318,624 Q303,564 287,517 L206,301 L432,301 Z" /></symbol><symbol id="MORX-35/1.B" overflow="visible"><path d="M301,714 Q439,714 505,673 Q572,632 572,537 Q572,474 537,432 Q502,391 436,379 L436,374 Q596,347 596,203 Q596,106 530,53 Q464,0 348,0 L97,0 L97,714 Z M319,410 Q407,410 443,438 Q479,467 479,527 Q479,585 437,611 Q396,637 305,637 L187,637 L187,410 Z M187,76 L331,76 Q421,76 460,111 Q500,146 500,210 Q500,270 459,302 Q418,335 324,335 L187,335 Z" /></symbol><symbol id="MORX-35/1.C" overflow="visible"><path d="M392,645 Q277,645 211,568 Q145,491 145,357 Q145,221 207,145 Q270,69 391,69 Q468,69 562,97 L562,19 Q522,4 479,-3 Q436,-10 378,-10 Q217,-10 133,87 Q50,185 50,358 Q50,467 90,549 Q130,632 207,678 Q285,724 393,724 Q448,724 498,713 Q549,702 590,682 L554,606 Q468,645 392,645 Z" /></symbol><symbol id="MORX-35/1.E" overflow="visible"><path d="M97,0 L97,714 L496,714 L496,635 L187,635 L187,412 L478,412 L478,334 L187,334 L187,79 L496,79 L496,0 Z" /></symbol><use x="0" y="0" xlink:href="#MORX-35/1.A" /><use x="639" y="0" xlink:href="#MORX-35/1.B" /><use x="1265" y="0" xlink:href="#MORX-35/1.C" /><use x="1861" y="0" xlink:href="#MORX-35/1.E" /></svg></td>

    <td class="expected" ft:id="MORX-35/2" ft:render="XAY"
        ft:font="TestMORXThirtyfive.ttf"><svg version="1.1" viewBox="0 -200 3569 1200"><symbol id="MORX-35/2.X" overflow="visible"><path d="M480,0 L291,310 L99,0 L4,0 L241,372 L19,714 L119,714 L294,434 L470,714 L565,714 L344,374 L582,0 Z" /></symbol><symbol id="MORX-35/2.A" overflow="visible"><path d="M459,221 L176,221 L91,0 L0,0 L279,717 L360,717 L638,0 L545,0 Z M352,517 Q345,537 335,568 Q325,599 318,624 Q303,564 287,517 L206,301 L432,301 Z" /></symbol><symbol id="MORX-35/2.B" overflow="visible"><path d="M301,714 Q439,714 505,673 Q572,632 572,537 Q572,474 537,432 Q502,391 436,379 L436,374 Q596,347 596,203 Q596,106 530,53 Q464,0 348,0 L97,0 L97,714 Z M319,410 Q407,410 443,438 Q479,467 479,527 Q479,585 437,611 Q396,637 305,637 L187,637 L187,410 Z M187,76 L331,76 Q421,76 460,111 Q500,146 500,210 Q500,270 459,302 Q418,335 324,335 L187,335 Z" /></symbol><symbol id="MORX-35/2.C" overflow="visible"><path d="M392,645 Q277,645 211,568 Q145,491 145,357 Q145,221 207,145 Q270,69 391,69 Q468,69 562,97 L562,19 Q522,4 479,-3 Q436,-10 378,-10 Q217,-10 133,87 Q50,185 50,358 Q50,467 90,549 Q130,632 207,678 Q285,724 393,724 Q448,724 498,713 Q549,702 590,682 L554,606 Q468,645 392,645 Z" /></symbol><symbol id="MORX-35/2.E" overflow="visible"><path d="M97,0 L97,714 L496,714 L496,635 L187,635 L187,412 L478,412 L478,334 L187,334 L187,79 L496,79 L496,0 Z" /></symbol><symbol id="MORX-35/2.Y" overflow="visible"><path d="M469,714 L566,714 L328,277 L328,0 L238,0 L238,273 L0,714 L98,714 L283,363 Z" /></symbol><use x="0" y="0" xlink:href="#MORX-35/2.X" /><use x="586" y="0" xlink:href="#MORX-35/2.A" /><use x="1225" y="0" xlink:href="#MORX-35/2.B" /><use x="1851" y="0" xlink:href="#MORX-35/2.C" /><use x="2447" y="0" xlink:href="#MORX-35/2.E" /><use x="3003" y="0" xlink:href="#MORX-35/2.Y" /></svg></td>
  </tr>
  <tr>
    <th>Observed</th>
    <td class="observed" ft:id="MORX-35/1"/>
    <td class="observed" ft:id="MORX-35/2"/>
  </tr>
  <tr>
    <th class="conformance-header">Conformance</th>
    <td class="conformance" ft:id="MORX-35/1"/>
    <td class="conformance" ft:id="MORX-35/2"/>
  </tr>
</table>
</body>
</html>
